_require local "../../../../ml-yacc-lib.smi"
_require local "../../../data/symbols/main/Symbol.smi"
_require local "../../../data/symbols/main/RecordLabel.smi"

(* _require local "../../../data/runtimetypes/main/FFIAttributes.ppg.smi" *)
_require local "../../../compilerIRs/absyn/main/RequirePath.smi"
_require local "../../../compilerIRs/absyn/main/AbsynSQL.smi"

_require "../../../../basis.smi"
_require "../../../data/symbols/main/Loc.smi"
_require "../../../compilerIRs/absyn/main/Absyn.smi"

structure ML =
struct
  structure ParserData =
  struct
    structure EC =
    struct
      type term (= boxed)
      val showTerminal : term -> string
    end
    type svalue (= boxed)
    structure Token =
    struct
      datatype token = TOKEN of EC.term * (svalue * Loc.pos * Loc.pos)
    end
  end
  structure Parser =
  struct
    type token = ParserData.Token.token
    type stream (= ref)
    type result = Absyn.unitparseresult
    type pos = Loc.pos
    type arg = unit
    exception ParseError
    val makeStream : {lexer:unit -> token} -> stream
    val consStream : token * stream -> stream
    val getStream : stream -> token * stream
    val sameToken : token * token -> bool
    val parse : {lookahead:int,
                 stream:stream,
                 error: (string * pos * pos -> unit),
                 arg: arg}
                -> result * stream
  end
  structure Tokens =
  struct
    type pos = Parser.pos
    type token = Parser.token
val WORD: ({ radix:StringCvt.radix,digits:string } ) *  pos * pos -> token
val WITHTYPE:  pos * pos -> token
val WITH:  pos * pos -> token
val WHILE:  pos * pos -> token
val WHERE:  pos * pos -> token
val VALUES:  pos * pos -> token
val VAL:  pos * pos -> token
val USE':  pos * pos -> token
val USE:  pos * pos -> token
val UPDATE:  pos * pos -> token
val UNKNOWN:  pos * pos -> token
val UNDERBAR:  pos * pos -> token
val FREE_TYVAR: (string) *  pos * pos -> token
val TYVAR: (string) *  pos * pos -> token
val TYPE:  pos * pos -> token
val TRUE:  pos * pos -> token
val THEN:  pos * pos -> token
val SYMBOLICID: (string) *  pos * pos -> token
val STRUCTURE:  pos * pos -> token
val STRUCT:  pos * pos -> token
val STRING: (string) * pos * pos -> token
val SQLSERVER:  pos * pos -> token
val SQLEXEC:  pos * pos -> token
val SQLEVAL:  pos * pos -> token
val SQL:  pos * pos -> token
val SPECIAL: (string) *  pos * pos -> token
val REIFYTY:  pos * pos -> token
val SIZEOF:  pos * pos -> token
val SIGNATURE:  pos * pos -> token
val SIG:  pos * pos -> token
val SHARING:  pos * pos -> token
val SET:  pos * pos -> token
val SEMICOLON:  pos * pos -> token
val SELECT:  pos * pos -> token
val SELECTOR: (string) * pos * pos -> token
val RPAREN:  pos * pos -> token
val ROWS:  pos * pos -> token
val ROW:  pos * pos -> token
val ROLLBACK:  pos * pos -> token
val REQUIRE:  pos * pos -> token
val REC:  pos * pos -> token
val REAL: (string) *  pos * pos -> token
val RBRACKET:  pos * pos -> token
val RBRACE:  pos * pos -> token
val RAISE:  pos * pos -> token
val PREFIXEDLABEL: (string) *  pos * pos -> token
val POLYREC:  pos * pos -> token
val PERIODS:  pos * pos -> token
val PERIOD:  pos * pos -> token
val ORELSE:  pos * pos -> token
val ORDER:  pos * pos -> token
val OR:  pos * pos -> token
val OPEN:  pos * pos -> token
val OPAQUE:  pos * pos -> token
val OP:  pos * pos -> token
val ONLY:  pos * pos -> token
val ON:  pos * pos -> token
val OFFSET:  pos * pos -> token
val OF:  pos * pos -> token
val NULL:  pos * pos -> token
val NOT:  pos * pos -> token
val NONFIX:  pos * pos -> token
val NEXT:  pos * pos -> token
val NEWLINE:  pos * pos -> token
val NATURAL:  pos * pos -> token
val LPAREN:  pos * pos -> token
val LOCAL:  pos * pos -> token
val LIMIT:  pos * pos -> token
val LET:  pos * pos -> token
val LBRACKET:  pos * pos -> token
val LBRACE:  pos * pos -> token
val DYNAMICIS:  pos * pos -> token
val DYNAMICVIEW:  pos * pos -> token
val DYNAMICCASE:  pos * pos -> token
val DYNAMICTOP:  pos * pos -> token
val DYNAMICNULL:  pos * pos -> token
val DYNAMIC:  pos * pos -> token
val EXTENDOP:  pos * pos -> token
val UPDATEOP:  pos * pos -> token
val JOINOP:  pos * pos -> token
val JOIN:  pos * pos -> token
val IS:  pos * pos -> token
val INTO:  pos * pos -> token
val INTLAB: (string) *  pos * pos -> token
val INTERFACE:  pos * pos -> token
val INT: ({ radix:StringCvt.radix,digits:string } ) *  pos * pos -> token
val INSERT:  pos * pos -> token
val INNER:  pos * pos -> token
val INFIXR:  pos * pos -> token
val INFIX:  pos * pos -> token
val IN:  pos * pos -> token
val INCLUDE:  pos * pos -> token
val IMPORT:  pos * pos -> token
val IF:  pos * pos -> token
val HAVING:  pos * pos -> token
val HASH:  pos * pos -> token
val HANDLE:  pos * pos -> token
val GROUP:  pos * pos -> token
val FUNCTOR:  pos * pos -> token
val FUN:  pos * pos -> token
val FROM:  pos * pos -> token
val FOREACH:  pos * pos -> token
val FN:  pos * pos -> token
val FIRST:  pos * pos -> token
val FETCH:  pos * pos -> token
val FALSE:  pos * pos -> token
val EXISTS:  pos * pos -> token
val EXCEPTION:  pos * pos -> token
val FREE_EQTYVAR: (string) *  pos * pos -> token
val EQTYVAR: (string) *  pos * pos -> token
val EQTYPE:  pos * pos -> token
val EQ:  pos * pos -> token
val END:  pos * pos -> token
val ELSE:  pos * pos -> token
val DO:  pos * pos -> token
val DISTINCT:  pos * pos -> token
val DESC:  pos * pos -> token
val DELETE:  pos * pos -> token
val DEFAULT:  pos * pos -> token
val DATATYPE:  pos * pos -> token
val DARROW:  pos * pos -> token
val CROSS:  pos * pos -> token
val COMMIT:  pos * pos -> token
val COMMA:  pos * pos -> token
val COLON:  pos * pos -> token
val CHAR: (string) *  pos * pos -> token
val CASE:  pos * pos -> token
val BY:  pos * pos -> token
val BUILTIN:  pos * pos -> token
val BEGIN:  pos * pos -> token
val BAR:  pos * pos -> token
val ATTRIBUTE:  pos * pos -> token
val AT:  pos * pos -> token
val ASTERISK:  pos * pos -> token
val ASC:  pos * pos -> token
val AS:  pos * pos -> token
val ARROW:  pos * pos -> token
val ANDALSO:  pos * pos -> token
val AND:  pos * pos -> token
val ALPHABETICID: (string) *  pos * pos -> token
val ALL:  pos * pos -> token
val ABSTYPE:  pos * pos -> token
val EOF:  pos * pos -> token
  end
end
